/*
 * \file XmlDirModel.cpp
 *
 * \date Created on: Jan 31, 2009
 * \author sarah
 */

#include <Models/XmlDirModel.h>
#include <Xml/XmlDirectory.h>

#include <QDir>
#include <QDebug>

XmlDirModel::XmlDirModel(QObject *(parent))
    : QDirModel(parent)
{
}

XmlDirModel::~XmlDirModel()
{
}

int XmlDirModel::columnCount(const QModelIndex & parent) const
{
    if (parent.isValid())
        return 0;
    return 1;
}

QVariant XmlDirModel::data(const QModelIndex & index, int role) const
{
    if (role == Qt::DecorationRole)
    {
        QString path = filePath(index);
        XmlDirectory xmlDir;
        QDir dataRoot = xmlDir.dataRootDir();
        qDebug() << "XmlDirModel::data - path" << path;
        qDebug() << "XmlDirModel::data - root dir" << dataRoot.path();
    }
    return QDirModel::data(index, role);
}




